<template>
  <view>
    <!-- 公共组件-每个页面必须引入 -->
    <public-module></public-module>
    <u-navbar title="" :autoBack="true"> </u-navbar>
    <view class="order_success_conton">
      <view class="success_png">
        <img :src="'./static/order/suss.png'" alt="" />
      </view>
      <view class="success_text">支付成功</view>

      <view class="wait_text">請等待送餐</view>
      <view class="gotoHome" @click="toHome"> 返回首頁 </view>
    </view>
  </view>
</template>

<script>
import { mapState } from "vuex";
import base from "@/config/baseUrl.js";
import goodOne from "@/components/module/good";
import specsPopup from "@/components/module/specs-popup";
import fTabbar from "@/components/module/f-tabbar/f-tabbar";
export default {
  components: {
    goodOne,
    specsPopup,
    fTabbar,
  },
  computed: {
    ...mapState(["PrimaryColor"]),
  },
  data() {
    return {
      systemInfo: base.systemInfo,
    };
  },
  onLoad(e) {
    // 隐藏原生的tabbar
    uni.hideTabBar();
  },
  onReady() {},
  onShow() {},
  methods: {
    // 返回首頁
    toHome() {
      uni.switchTab({
        url: "/pages/index/index",
      });
    },
  },
};
</script>

<style lang="scss" scoped>
page {
  background-color: rgba(255, 255, 255, 1);
}

.order_success_conton {
  // background: rgba(250, 250, 250, 1);

  // 定位居中
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translate(-50%, -10%);

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  // 成功標誌
  .success_png {
    width: 167.442rpx;
    height: 167.442rpx;
    border-radius: 50%;
    background: rgba(36, 182, 102, 1);
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .success_text {
    font-family: "Microsoft Yi Baiti";
    font-size: 34.884rpx;
    color: rgba(0, 0, 0, 1);
    margin-top: 20.93rpx;
  }
  .wait_text {
    width: 498.837rpx;
    height: 73.256rpx;
    border-radius: 26.163rpx;
    background: rgba(247, 154, 77, 1);
    font-family: "Microsoft JhengHei";
    font-size: 34.884rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(255, 255, 255, 1);
    margin-top: 52.326rpx;
  }
  .gotoHome {
    width: 498.837rpx;
    height: 73.256rpx;
    border-radius: 26.163rpx;
    background: rgba(255, 255, 255, 1);
    font-family: "Microsoft JhengHei";
    font-size: 34.884rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(247, 154, 77, 1);
    margin-top: 52.326rpx;
    border: 0.5px solid rgba(247, 154, 77, 1)
  }
}
</style>
